package com.dream.keigezhushou.Activity.acty.login;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.TextView;

import com.dream.keigezhushou.Activity.BaseActivity;
import com.dream.keigezhushou.Activity.MainActivity;
import com.dream.keigezhushou.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class Login2Activity extends BaseActivity implements View.OnClickListener {

    @BindView(R.id.iv_return)
    ImageView ivReturn;
    @BindView(R.id.iv_delete_pass)
    ImageView ivDeletePass;
    @BindView(R.id.tv_forget_pass)
    TextView tvForgetPass;
    @BindView(R.id.btn_login)
    Button btnLogin;
    private Intent intent;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login2);
        ButterKnife.bind(this);

        initData();
    }

    //初始化数据
    protected void initData(){

        ivReturn.setOnClickListener(this);
        ivDeletePass.setOnClickListener(this);
        tvForgetPass.setOnClickListener(this);
        btnLogin.setOnClickListener(this);
    }

    //点击事件的实现

    @Override
    public void onClick(View view) {

        switch (view.getId()){

            case R.id.iv_return:

                //返回
                finish();
                break;

            case R.id.iv_delete_pass:

                break;

            case R.id.tv_forget_pass:

                //找回密码
                intent = new Intent(this,FindPassActivity.class);
                startActivity(intent);
                break;

            case R.id.btn_login:

                //登录
                intent = new Intent(this,MainActivity.class);
                startActivity(intent);
                break;
        }
    }
}
